package com.stedu.mall.common.service;

import com.github.pagehelper.PageInfo;
import com.stedu.mall.common.bean.User;
import com.stedu.mall.common.exception.SteduException;

public interface UserService {
    //登录
    User login(String username, String password) throws SteduException;
    //注册
    boolean reg(User user) throws SteduException;
    //根据id获取用户信息
    User selectById(Integer id);
    PageInfo<User> selectAllByCondition(User condition, Integer pageNum, Integer pageSize);

    boolean update(User user) throws SteduException;
    //修改密码
    boolean updatePassword(String oldPassword, String newPassword, String confirmPassword, Integer userId) throws SteduException;
    //修改登录密码
    boolean updatePayPassword(String loginPassword, String newPayPassword, String confirmPayPassword, Integer userId) throws SteduException;
    boolean pay(User user) throws SteduException;
}
